import { createPinia } from 'pinia'
import type { App } from 'vue'

import { initDarkApp } from '@/apps/dark/init'
import { initPageTabApp } from '@/apps/pages/init'

const store = createPinia()

function setupStore(app: App<Element>) {
  app.use(store)
  initDarkApp()
  initPageTabApp()
}

export { store, setupStore }
